# import sys
# file = sys.stdout
# file.write('Hello')
#
# print('World')

# file = open('test.txt', 'r')
# print(file.read())

#不需要写 close
with open('test.txt', 'r',encodeing='utf-8') as file2:
    list2 = file2.readlines()
    print(list2)

str2 = "day day up"
with open('test.txt', 'w',encoding='utf-8') as file3:
    file3.write(str2)


file = open('test.txt', 'r')
print(file.read(1))
print(file.read(1))
print(file.tell())
print(file.seek(2))
